{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "source": [
    "#hide\n",
    "from m3tl.params import Params"
   ],
   "outputs": [],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "\n",
    "# M3TL\n"
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "**M**ulti-**M**odal **M**ulti-**T**ask **L**earning\n",
    "\n",
    "## Install\n",
    "\n",
    "```\n",
    "MASKED\n",
    "```\n",
    "\n",
    "## What is it\n",
    "\n",
    "This is a project that uses transformers(based on huggingface transformers) as base model to do **multi-modal multi-task learning**.   \n",
    "\n",
    "## Why do I need this\n",
    "\n",
    "Multi-task learning(MTL) is gaining more and more attention, especially in deep learning era. It is widely used in NLP, CV, recommendation, etc. However, MTL usually involves complicated data preprocessing, task managing and task interaction. Other open-source projects, like TencentNLP and PyText, supports MTL but in a naive way and it's not straightforward to implement complicated MTL algorithm. In this project, we try to make writing MTL model as easy as single task learning model and further extend MTL to multi-modal multi-task learning. To do so, we expose following MTL related programable module to user:\n",
    "\n",
    "- problem sampling strategy\n",
    "- loss combination strategy\n",
    "- gradient surgery\n",
    "- model after base model(transformers)\n",
    "\n",
    "Apart from programable modules, we also provide various built-in SOTA MTL algorithms.\n",
    "\n",
    "In a word, you can use this project to:\n",
    "\n",
    "- implement complicated MTL algorithm\n",
    "- do SOTA MTL without diving into details\n",
    "- do multi-modal learning\n",
    "\n",
    "And since we use transformers as base model, you get all the benefits that you can get from transformers!\n",
    "\n",
    "## What type of problems are supported?"
   ],
   "metadata": {}
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "source": [
    "params = Params()\n",
    "for problem_type in params.list_available_problem_types():\n",
    "    print('`{problem_type}`: {desc}'.format(\n",
    "        desc=params.problem_type_desc[problem_type], problem_type=problem_type))\n"
   ],
   "outputs": [
    {
     "output_type": "stream",
     "name": "stdout",
     "text": [
      "`cls`: Classification\n",
      "`multi_cls`: Multi-Label Classification\n",
      "`seq_tag`: Sequence Labeling\n",
      "`masklm`: Masked Language Model\n",
      "`pretrain`: NSP+MLM(Deprecated)\n",
      "`regression`: Regression\n",
      "`vector_fit`: Vector Fitting\n",
      "`premask_mlm`: Pre-masked Masked Language Model\n",
      "`contrastive_learning`: Contrastive Learning\n"
     ]
    }
   ],
   "metadata": {}
  },
  {
   "cell_type": "markdown",
   "source": [
    "\n",
    "## Get Started\n",
    "\n",
    "Please see tutorials.\n"
   ],
   "metadata": {}
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}